<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      >
    <h:head>
        <meta charset="utf-8"/>
        <title>Solution billeterie</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta name="description" content=""/>
        <meta name="author" content=""/>
        
        <!-- Le styles -->
        <link href="assets/css/bootstrap.css" rel="stylesheet"/>
        <link href="assets/css/main.css" rel="stylesheet"/>

        <style type="text/css">
            body {
                padding-top: 60px;
            }
        </style>
        <link href="assets/css/bootstrap-responsive.css" rel="stylesheet" />
        <link rel="shortcut icon" href="assets/ico/favicon.ico"/>
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"/>
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"/>
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"/>
        <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png" />
        <!-- Google Fonts call. Font Used Open Sans -->
        
    </h:head>
    <h:body>

        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="index.xhtml?faces-redirect=true"><img src="assets/img/logo-small.png" alt=""/> Solution Billetterie</a>
                    <ui:include src="header.xhtml" />
                </div>
            </div>
        </div>

        <!-- *********************************************************************************** -->

        <div class="container">

            <!-- CONTENT -->
            <div class="row-fluid">
                <br/>
                <!-- Invoice -->
                <div style="height:60px;"  class="invoice-unit">
                    <div class="invoice">
                        <div class="invoice-name">
                            Parametrage 
                        </div>
                        <div  class="invoice-company">
                            <h3 style="font-size:26px;"><strong>Parametrage</strong></h3><h5>Guichets</h5>
                        </div>                          
                    </div>
                    <h:form>
                        <center>
                           
                                <div  class="span2">
                                    <div  class="dash2-unit" style="background-color: #fff;	-moz-box-shadow:    3px 3px 2px 0px #98948e;
                                         -webkit-box-shadow: 3px 3px 2px 0px #98948e;
                                         box-shadow:         3px 3px 2px 0px #98948e;
                                         cursor:pointer;">

                                        <br/>
                                        <p style="text-align:center"><img src="assets/img/guichet.png" alt=""/></p>
                                        <h2>Guichets</h2>
                                        
                                        <br/>

                                    </div><!-- /dash2-unit -->
                                </div><!-- /span2 -->
                  
                                
                                <h:form   style="font-size: x-small;">  
                            <p:growl id="growl" autoUpdate="true" />
                            <h:panelGrid style="text-align: center;"  columns="1" width="70%" >
                                <p:dataTable style="font-size: x-small;" id="dataTable" var="user" value="#{guichetBean.users}" 
                                             emptyMessage="Aucun utilisateur" 
                                             paginator="true" rows="5"  
                                             >  
                                    <p:column id="ID"    
                                              headerText="ID"   
                                              filterMatchMode="contains">  
                                        <h:outputText value="#{user.id}" />  
                                    </p:column>  
                                    <p:column id="username" filterBy="#{user.username}"  
                                              headerText="Username"   
                                              filterMatchMode="contains">  
                                        <h:outputText value="#{user.username}" />  
                                    </p:column>  
                                    
                                    <p:column id="op" filterBy="#{user.operateur}"  
                                              headerText="op"   
                                              filterMatchMode="contains">  
                                        <h:outputText value="#{user.operateur}" />  
                                    </p:column>  
                                    <p:column id="option"   
                                              headerText="Option"   
                                              >  
                                        <f:facet name="header"  >
                                            <p:commandLink onclick="dlg3.show();"   >
                                                <img src="./img/plus_32.png"  style="width: 18px;"  />
                                            </p:commandLink>
                                        </f:facet>
                                        <h:panelGrid border="" columns="3">
                                            
                                            
                                            <p:commandLink  action="#{guichetBean.delete(user)}"  update="@this,dataTable" >
                                                <img src="./img/delete_32.png" style="width: 18px;"/>
                                            </p:commandLink>
                                        </h:panelGrid>
                                        <h:outputText value="" />  
                                    </p:column>
                                </p:dataTable>  
                            </h:panelGrid>
                            <p:dialog header="Car Detail" widgetVar="carDialog" resizable="false" id="carDlg"  
                                      showEffect="fade" hideEffect="explode" modal="true">  
                                <h:panelGrid id="display" columns="2" cellpadding="4" style="margin:0 auto;">  
                                </h:panelGrid>  
                                #{guichetBean.userToEdit.username}
                                <h:outputText value="Model:" />  
                                <h:outputText value="#{guichetBean.userToEdit.username}" style="font-weight:bold"/>  
                            </p:dialog>  
                            <p:confirmDialog id="confirmDialog" message="voulez vous supprimer cette utilisateur"  header="Suppression"  severity="alert" widgetVar="confirmation">  
                                <p:commandButton id="confirm" ajax="false" value="Yes Sure"  oncomplete="confirmation.hide()"  
                                                 />  
                                <p:commandButton ajax="false" id="decline" value="Not Yet" onclick="confirmation.hide()"  />   
                            </p:confirmDialog>  
                            <p:dialog header="Ajout utilisateur"   modal="true" width="550" widgetVar="dlg3" resizable="false">
                                <div class="widget-box">
                                    <div class="widget-content nopadding">
                                        <form class="form-horizontal" method="post" action="#" name="basic_validate" id="basic_validate" novalidate="novalidate">
                                            <div class="control-group">
                                                <label class="control-label">Username</label>
                                                <div class="controls">
                                                    <h:inputText  id="login"   value="#{guichetBean.userNew.username}"  />
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label">Operateur</label>
                                                <div class="controls">
                                                    <h:inputText  id="Operateur"   value="#{guichetBean.userNew.operateur}"  />
                                                </div>
                                            </div>
                                            
                                            <div class="control-group">
                                                <label class="control-label">Password</label>
                                                <div class="controls">
                                                    <h:inputSecret  id="pass1"  value="#{guichetBean.userNew.password}"  />
                                                </div>
                                            </div>
                                            <div class="control-group">
                                                <label class="control-label">Confirm Password</label>
                                                <div class="controls">
                                                    <h:inputSecret  id="pass2"   value="#{guichetBean.secondPassword}" />
                                                </div>
                                            </div> 
                                           
                                            <div class="form-actions">
                                                <p:commandButton ajax="true" update="dataTable,growl,login,pass1,pass2"  oncomplete="dlg3.hide();"   actionListener="#{guichetBean.add()}"  value="Ajouter" styleClass="btn btn-primary"/>
                                           </div>
                                      
                                            
                                        </form>
                                    </div>
                                </div>
                            </p:dialog>  
                        </h:form>  	
                        </center>
                    </h:form>
                </div><!-- /BlockUnit -->
            </div><!-- /row -->
        </div>
        



    </h:body>
</html>